Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow ConfigWatcher to watch several files (#236) #237

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

adietish
Copy link
Contributor

fixes #236

@adietish adietish self-assigned this Sep 12, 2024
@adietish adietish force-pushed the issue-236 branch 2 times, most recently from 6c518ed to 9e3740c Compare September 12, 2024 18:02
@adietish adietish changed the title allow ConfigWatcher to watch several files (#236) feat: allow ConfigWatcher to watch several files (#236) Sep 12, 2024
@adietish adietish force-pushed the issue-236 branch 3 times, most recently from 7d43719 to 71db90d Compare September 13, 2024 17:28
@adietish adietish marked this pull request as ready for review September 13, 2024 17:32
@adietish adietish requested a review from sbouchet September 13, 2024 17:32
@adietish
Copy link
Contributor Author

@sbouchet please review.

@adietish
Copy link
Contributor Author

@sbouchet: please review

Copy link
Contributor

@sbouchet sbouchet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code looks ok. what's the process to actually test it ? compile locally then use that build in kuberntes with multiple kubeconfig files ?

@adietish
Copy link
Contributor Author

adietish commented Sep 19, 2024

@sbouchet:
This updated watcher is watching whatever files you give it. It would watch several files if you given it several ones, watch only a single one if you give it a single file only:

  1. First thing to do is to use it with the current tooling, openshift and/or kubernetes. I'd change the config file at ~/.kube/config and verify that the toolings reacting to the changes and refresh the trees.
  2. In a 2nd step you can then install the maven artifact in your local m2 repo and test it when reviewing Cannot get my clusters to appear intellij-kubernetes#779. That PR makes intellij-kubernetes watch all the files listed in KUBECONFIG= and is passing those to this watcher.
    Instructions are in issuecomment-2277887769 and issuecomment-2265980362.
    I have serveral files: ~/.kube/minikube.yml, ~/.kube/rh-sandbox.yml and ~/.kube/config. The latter only has the property current-config. This property is set to the name of the minikube context defined in the file for minikube (minikube.yml) or context for the RH sandbox that's defined in the file for the RH sandbox (rh-sandbox.yml).

@adietish adietish requested a review from sbouchet September 23, 2024 09:31
Copy link

Copy link
Contributor

@sbouchet sbouchet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works fine with multiples or single files.

@adietish adietish merged commit 71b135b into redhat-developer:main Oct 17, 2024
10 checks passed
@adietish adietish deleted the issue-236 branch October 17, 2024 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ConfigWatcher should be able to handle multiple config files
2 participants